<%-- 
    Document   : ViewProductDetails
    Created on : Nov 22, 2012, 10:03:04 PM
    Author     : vupttse
--%>

<%@page import="assignment2.data.Products"%>
<%@page import="assignment2.stub.ProductsTbl_Stub"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>View Product Detail</title>
        <link href="css/modern.css" rel="stylesheet">
        <link href="css/modern-responsive.css" rel="stylesheet">
        <link href="css/site.css" rel="stylesheet" type="text/css">

        <script src="js/jquery-1.8.2.min.js"></script>
        <script src="js/google-analytics.js"></script>
        <script src="js/github.info.js"></script>
        <script src="js/sharrre/jquery.sharrre-1.3.4.min.js"></script>
        <script src="js/carousel.js"></script>
        <script src="js/dropdown.js"></script>
        <script src="js/slider.js"></script>
        <script src="js/hover.js"></script>
        <script src="js/pagecontrol.js"></script>
        <script src="js/accordion.js"></script>
    </head>
    <body>
        <% String productId = request.getParameter("productId");
        ProductsTbl_Stub productsTbl_Stub = new ProductsTbl_Stub();
            Products product = productsTbl_Stub.findByID(productId);
        %>
        <div class="page">
            <jsp:include page="Navigation.jsp"></jsp:include>

                <div class="page-region">
                    <div class="page-region-content bg-color-blueLight" style="min-height: 320px">
                        <div class="grid">
                            <div class="row">
                                <div class="span5" style="padding-left: 10px">
                                    <img src="<%=product.getProductImage()%>" class="imgOpa" height="320px" width="100%">
                            </div>
                            <div class="span6 fg-color-purple" style="margin-top: 50px">
                                <form action="AddToCart.jsp?productId=<%=productId%>" method="post">
                                    <table class="hovered span5"> 
                                        <tr>
                                            <td>Product ID</td><td><%=product.getProductID()%></td>
                                        </tr>
                                        <tr>
                                            <td>Category ID</td><td><%=product.getCategoryID()%></td>
                                        </tr>
                                        <tr>
                                            <td>Unit Price</td><td><%=product.getUnitPrice()%></td>
                                        </tr>
                                        <tr>
                                            <td>Units In Stock</td><td><%=product.getUnitsInStock()%></td>
                                        </tr>
                                        <tr>
                                            <td>Units In Order</td><td><%=product.getUnitsInOrder()%></td>
                                        </tr>
                                        <tr>
                                            <td>Product Image</td><td><%=product.getProductName()%></td>
                                        </tr>
                                        <tr>
                                            <td>Description</td><td><%=product.getDescription()%></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <i class="icon-cart-large"></i>
                                            </td>
                                            <td>
                                                <input type="submit" value="AddToCart">
                                            </td>
                                        </tr>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>               
            </div>
            <%@include file="footer.html" %>
        </div>
    </body>
</html>
